import React from 'react'
import { Descriptions } from 'antd'
import PropTypes from 'prop-types'

const Comp=({ data = [], title, column = { xxl: 3, xl: 3, lg: 2, md: 2, sm: 2, xs: 1 }, ...props }) => {
  return (
    <Descriptions
      title={title}
      column={column}
      {...props}
    >
      {data.map((v, i) =>
        <Descriptions.Item key={i} label={v.label}>
          {v.value}
        </Descriptions.Item>
      )}
    </Descriptions>
  )
}
Comp.propTypes={
  data: PropTypes.array,
  title: PropTypes.string,
  column: PropTypes.object
}

export default Comp
